package com.zw.test;

import org.junit.Test;

public class Main {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        String str = " abc ";
        System.out.println(str.trim());
        System.out.println(str.strip());
    }

    @Test
    public void test1() {
        var str = " ";

        System.out.println(str.isBlank());
    }

    @Test
    public void test2() {
        int month = 314;
        String a = switch (month) {
            case 3, 4, 5 -> "春天";
            case 6, 7, 8 -> "夏天";
            case 9, 10, 11 -> "秋天";
            case 12, 1, 2 -> "冬天";
            default -> String.valueOf(1);
        };
    }

    @Test
    public void test4() {
        String str = """
                你好，
                ~~~  噫噫噫
                ！！！
                """;
        System.out.println("str = " + str);
    }

    class User {
        private String name;
        private int age;
        private String address;
    }

    record Stu(String name, int age){
    }

    @Test
    public void test5() {
        Stu 张三 = new Stu("张三", 23);
        System.out.println(张三.age());
    }
}
